package level4.shaders
{
	import flash.display.DisplayObject;
	import flash.events.Event;
	import flash.filters.ShaderFilter;
	
	/**
	 * 旋转波浪 shader
	 * */
	public class WaveShader extends BaseShader
	{
		private var radius:Number = 10.0;
		
		
		public function WaveShader(do2d:DisplayObject)
		{
			super("assets/shaders/wave.pbj",do2d);
		}
		
		override public function update(timeDiff:Number):void{
			if(isShaderLoadOk){
				shader.data.radius.value = [radius];
				do2d.filters = [new ShaderFilter(shader)];
				radius -= 1;
				if(radius <= 1){
					clean();
				}
			}

		}
	}
}